  <?php foreach ($languages as $language): ?>
  <fieldset class="">
  <div class="form-row">
  <?php $page_i18n = PageI18nPeer::retrieveByPk($page->getId(), $language->getCulture()); ?>
    
    <?php if($page_i18n instanceof PageI18n): ?> 
  <dl>
  <dt><?php echo $language->getName(); ?></dt>
  <dd>
  <?php echo input_hidden_tag('page[i18n]['.$page_i18n->getCulture().'][id]', $page_i18n->getId()); ?>
  
      <div class="form-row">  
      <?php echo label_for('page[i18n]['.$page_i18n->getCulture().'][title]', __('Title'), 'class="required" ') ?>
      <div class="content">
        <?php echo input_tag('page[i18n]['.$page_i18n->getCulture().'][title]', $page_i18n->getTitle(), array ('size' => 80,)); ?>
      </div>
      </div>
      
      <div class="form-row">  
      <?php echo label_for('page[i18n]['.$page_i18n->getCulture().'][content]', __('Content'), 'class="required" ') ?>
      <div class="content">
        <?php echo textarea_tag('page[i18n]['.$page_i18n->getCulture().'][content]', $page_i18n->getContent(), array ('size' => '80x20', 'rich' => true)); ?>
      </div>
      </div>
    </dd>
    </dl>
    <?php else: ?>
  <dl>
  <dt><?php echo $language->getName(); ?></dt>
      <div class="form-row">  
      <?php echo label_for('page[i18n]['.$language->getCulture().'][title]', __('Title'), 'class="required" ') ?>
      <div class="content">
        <?php echo input_tag('page[i18n]['.$language->getCulture().'][title]', '', array ('size' => 80,)); ?>
      </div> 
      </div>
      <div class="form-row">  
      <?php echo label_for('page[i18n]['.$language->getCulture().'][content]', __('Content'), 'class="required" ') ?>
      <div class="content">
        <?php echo textarea_tag('page[i18n]['.$language->getCulture().'][content]', '', array ('size' => '80x20', 'rich' => true)); ?>
      </div>
      </div>
    </dd>
    </dl>
    <?php endif; ?>
    </div>
    </fieldset>
  <?php endforeach; ?>

